package com.itheima.dao;

import com.itheima.entity.User1;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface User1Mapper {
    @Insert("insert into user values (#{id}, #{name}, #{age}, #{address})")
    public abstract void save(User1 user1);

    @Delete("delete from user where id = #{id}")
    void removeById(Long id);

    @Update("update user set name=#{name},age=#{age},address=#{address} where id = #{id}")
    void updateById(User1 user1);


    @Select("select * from user where id = #{id}")
    User1 getById(Long id);

    List<User1> list(User1 user1);
}
